<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 400px;
            aspect-ratio: 1.6;
            background-color: #fff;
            border: 1px solid #333;
            margin: 100px auto;
            position: relative;
            --x: 3px;
            --y: 3px;
            --bg: linear-gradient(to right, red, yellow);
            --blur: 5px;
        }

        .box::after {
            content: '';
            position: absolute;
            left: var(--x, 0);
            top: var(--y, 0);
            width: 100%;
            height: 100%;
            background: var(--bg);
            filter: blur(var(--blur));
            z-index: -1;
            clip-path: polygon(-100vmax -100vmax,
                    100vmax -100vmax,
                    100vmax 100vmax,
                    -100vmax 100vmax,
                    -100vmax -100vmax,
                    calc(0px - var(--x)) calc(0px - var(--y)),
                    calc(0px - var(--x)) calc(100% - var(--y)),
                    calc(100% - var(--x)) calc(100% - var(--y)),
                    calc(100% - var(--x)) calc(0px - var(--y)),
                    calc(0px - var(--x)) calc(0px - var(--y)));
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>